package com.weai.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 任务数据传输对象
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "任务信息")
public class TaskDTO {
    
    @Schema(description = "任务ID")
    private Integer id;
    
    @Schema(description = "任务标题", required = true)
    @NotBlank(message = "任务标题不能为空")
    private String title;
    
    @Schema(description = "任务唯一标识")
    private String titleIndex;
    
    @Schema(description = "任务状态(todo|inProgress|done)")
    private String status;
    
    @Schema(description = "当前时间周期开始日期")
    private LocalDate periodStartDate;
    
    @Schema(description = "当前时间周期结束日期")
    private LocalDate periodEndDate;
    
    @Schema(description = "需求类型(业务需求/科技专项)", required = true)
    @NotBlank(message = "需求类型不能为空")
    private String type;
    
    @Schema(description = "子类型", required = true)
    @NotBlank(message = "子类型不能为空")
    private String subType;
    
    @Schema(description = "需求复杂度(高/中/低)", required = true)
    @NotBlank(message = "需求复杂度不能为空")
    private String level;
    
    @Schema(description = "当前进度(0-100)")
    private Integer process;
    
    @Schema(description = "本周工作")
    private String thisWeekPlan;
    
    @Schema(description = "下周计划")
    private String nextWeekPlan;
    
    @Schema(description = "存在的问题")
    private String problems;
    
    @Schema(description = "业务部门")
    private String busiDepartment;
    
    @Schema(description = "业务目标")
    private String busiGoal;
    
    @Schema(description = "IT部门")
    private String itDepartment;
    
    @Schema(description = "父任务ID")
    private String parentId;
    
    @Schema(description = "任务创建人", required = true)
    @NotBlank(message = "创建人不能为空")
    private String creater;
    
    @Schema(description = "任务处理人")
    private String receiver;
    
    @Schema(description = "任务修改人")
    private String updater;
    
    @Schema(description = "期望完成时间")
    private LocalDate expectedDate;
    
    @Schema(description = "最后完成时间")
    private LocalDate finishedDate;
    
    @Schema(description = "任务创建时间")
    private LocalDateTime createdTime;
    
    @Schema(description = "任务修改时间")
    private LocalDateTime updateTime;
} 